#include <string>
#include "MenuItem.h"

using namespace std;

namespace UI {
	MenuItem::MenuItem(int x, int y, string text){
		this->x = x;
		this->y = y;
		this->text = text;
	};
	
	void MenuItem::Draw(){
		//Moves to y, x coordinates
		if (Selected == true)
		{
			printf("\x1b[%i;%iH", y, x-2);
			printf("\x10 %s", text.data());
		}
		else
		{
			printf("\x1b[%i;%iH", y, x-2);
			printf("  %s", text.data());
		}
		Selected = false;
	};
}
